/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PanelPaso2.java
 *
 * Created on 11-nov-2009, 12:49:06
 */

package pestañas;

import java.awt.Color;
import utilidades.ValidaBarras;
import javax.swing.JProgressBar;
import javax.swing.JTextField;
import utilidades.ValidaUF;
import vistas.VistaPrincipal;

/**
 *
 * @author Shidobu
 */
public class PanelPaso2 extends javax.swing.JPanel {
	VistaPrincipal vista;
	JProgressBar barraProgreso;
        float resultadoUF;
        static float valorUF= (float) 1;//por mientras
        int valorTextField;
	
    /** Creates new form PanelPaso2 */
    public PanelPaso2() {
        initComponents();
       
    }

	public void setBarraProgreso (JProgressBar barraProgreso) {
		this.barraProgreso = barraProgreso;               
                /*Validar Barra */
                jTextFieldValorUF.addKeyListener(new ValidaUF(jTextFieldValorUF,barraProgreso));
                jTextFieldArriendoOficinaPesos.addKeyListener(new ValidaBarras(jTextFieldArriendoOficinaPesos, barraProgreso));
                jTextFieldGastosOperacionalesPesos.addKeyListener(new ValidaBarras(jTextFieldGastosOperacionalesPesos, barraProgreso));
                jTextFieldGastosMaterialApoyoPesos.addKeyListener(new ValidaBarras(jTextFieldGastosMaterialApoyoPesos, barraProgreso));
                jTextFieldInsumosPesos.addKeyListener(new ValidaBarras(jTextFieldInsumosPesos, barraProgreso));
                jTextFieldGastosBasicosPesos.addKeyListener(new ValidaBarras(jTextFieldGastosBasicosPesos, barraProgreso));
                jTextFieldGastosMovilizacionPesos.addKeyListener(new ValidaBarras(jTextFieldGastosMovilizacionPesos, barraProgreso));
                jTextFieldGastosCoffeBreaksPesos.addKeyListener(new ValidaBarras(jTextFieldGastosCoffeBreaksPesos, barraProgreso));
                jTextFieldGastosAlimentacionPesos.addKeyListener(new ValidaBarras(jTextFieldGastosAlimentacionPesos, barraProgreso));
                jTextFieldGastosServiciosExternosPesos.addKeyListener(new ValidaBarras(jTextFieldGastosServiciosExternosPesos, barraProgreso));
                jTextFieldValorFactorCosto.addKeyListener(new ValidaBarras(jTextFieldValorFactorCosto, barraProgreso));
                jTextFieldHorasReparacion.addKeyListener(new ValidaBarras(jTextFieldHorasReparacion, barraProgreso));
                jTextFieldValorHHDesarrolladorPesos.addKeyListener(new ValidaBarras(jTextFieldValorHHDesarrolladorPesos, barraProgreso));
                jTextFieldValorNumeroDesarrolladores.addKeyListener(new ValidaBarras(jTextFieldValorNumeroDesarrolladores,barraProgreso));

                

	}

	public void setVista (VistaPrincipal vista) {
	       this.vista = vista;
	}

        public void setUF(JTextField jt){
               if(!(jt.getText().equals("")) && jt.getText().matches("[0-9]*"+'.'+"[0-9]*"))
                  this.valorUF= Float.parseFloat(jt.getText());
               else
                   this.valorUF=(float)1; // ERROR O ADVERTENCIA, no existe UF
               
        }

        public JProgressBar getBarraProgreso() {
               return barraProgreso;
        }

        public void calculaUF(JTextField jTFPESOS,JTextField  jTFUF){
             if (!(jTFPESOS.getText().equals(""))) {
                if (jTFPESOS.getText().matches("[0-9]*")) {
                    valorTextField = Integer.parseInt(jTFPESOS.getText());
                    float resultadoUF = ((float) valorTextField) / valorUF;
                    jTFUF.setText(resultadoUF + "");
                }               
             }
             else  //Si el valor de gasto en pesos es nulo, se setea el valor del UF correspondiente
                 jTFUF.setText("");
              
             sumaTotal();// Se calcula la suma total de los gastos tanto en Pesos como en UF
            
            
        }

        public void sumaTotal(){
              int totalPesos=0;//variable que almacena la suma total en PESOS
              float totalUF=0; //variable que almacena la suma total en UF
          
              /*A continuacion se verifican los jtextField correspondiente al gasto en PESOS y se suma si es que el valor no es nulo*/
              if(!(jTextFieldArriendoOficinaPesos.getText()).equals(""))
                  totalPesos= totalPesos+Integer.parseInt(jTextFieldArriendoOficinaPesos.getText());

              if(!(jTextFieldGastosOperacionalesPesos.getText()).equals(""))
                  totalPesos= totalPesos+Integer.parseInt(jTextFieldGastosOperacionalesPesos.getText());

              if(!(jTextFieldGastosMaterialApoyoPesos.getText()).equals(""))
                  totalPesos= totalPesos+Integer.parseInt(jTextFieldGastosMaterialApoyoPesos.getText());

              if(!(jTextFieldInsumosPesos.getText()).equals(""))
                  totalPesos= totalPesos+Integer.parseInt(jTextFieldInsumosPesos.getText());

              if(!(jTextFieldGastosBasicosPesos.getText()).equals(""))
                  totalPesos= totalPesos+Integer.parseInt(jTextFieldGastosBasicosPesos.getText());

              if(!(jTextFieldGastosMovilizacionPesos.getText()).equals(""))
                  totalPesos= totalPesos+Integer.parseInt(jTextFieldGastosMovilizacionPesos.getText());

              if(!(jTextFieldGastosCoffeBreaksPesos.getText()).equals(""))
                  totalPesos= totalPesos+Integer.parseInt(jTextFieldGastosCoffeBreaksPesos.getText());

              if(!(jTextFieldGastosAlimentacionPesos.getText()).equals(""))
                  totalPesos= totalPesos+Integer.parseInt(jTextFieldGastosAlimentacionPesos.getText());

              if(!(jTextFieldGastosServiciosExternosPesos.getText()).equals(""))
                  totalPesos= totalPesos+Integer.parseInt(jTextFieldGastosServiciosExternosPesos.getText());

              /*A continuacion se verifican los jtextField correspondiente al gasto en UF y se suma si es que el valor no es nulo*/

              if(!(jTextFieldArriendoOficinaUF.getText()).equals(""))
                  totalUF= totalUF+Float.parseFloat(jTextFieldArriendoOficinaUF.getText());

              if(!(jTextFieldGastosOperacionalesUF.getText()).equals(""))
                  totalUF= totalUF+Float.parseFloat(jTextFieldGastosOperacionalesUF.getText());

              if(!(jTextFieldGastosMaterialApoyoUF.getText()).equals(""))
                  totalUF= totalUF+Float.parseFloat(jTextFieldGastosMaterialApoyoUF.getText());

              if(!(jTextFieldInsumosUF.getText()).equals(""))
                  totalUF= totalUF+Float.parseFloat(jTextFieldInsumosUF.getText());

              if(!(jTextFieldGastosBasicosUF.getText()).equals(""))
                  totalUF= totalUF+Float.parseFloat(jTextFieldGastosBasicosUF.getText());

              if(!(jTextFieldGastosMovilizacionUF.getText()).equals(""))
                  totalUF= totalUF+Float.parseFloat(jTextFieldGastosMovilizacionUF.getText());

              if(!(jTextFieldGastosCoffeBreaksUF.getText()).equals(""))
                  totalUF= totalUF+Float.parseFloat(jTextFieldGastosCoffeBreaksUF.getText());

              if(!(jTextFieldGastosAlimentacionUF.getText()).equals(""))
                  totalUF= totalUF+Float.parseFloat(jTextFieldGastosAlimentacionUF.getText());

              if(!(jTextFieldGastosServiciosExternosUF.getText()).equals(""))
                  totalUF= totalUF+Float.parseFloat(jTextFieldGastosServiciosExternosUF.getText());
                                    

              /* Se ingresan los resultados a los jtextfield del TOTAL*/

              jTextFieldGastosTotalPesos.setText(String.valueOf(totalPesos));
              jTextFieldGastosTotalUF.setText(String.valueOf(totalUF));

    }



  
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanelValorUF = new javax.swing.JPanel();
        jLabelIngresoValorUF = new javax.swing.JLabel();
        jTextFieldValorUF = new javax.swing.JTextField();
        jPanelCostosDiseñoEvaluacionAnalisis = new javax.swing.JPanel();
        jPanelFactorCosto = new javax.swing.JPanel();
        jLabelFactorCosto = new javax.swing.JLabel();
        jTextFieldValorFactorCosto = new javax.swing.JTextField();
        jPanelTotalCosto = new javax.swing.JPanel();
        jLabelTotalCostoPesos = new javax.swing.JLabel();
        jLabelTotalCostosUF = new javax.swing.JLabel();
        jTextFieldTotalCostoPesos = new javax.swing.JTextField();
        jTextFieldTotalCostoUF = new javax.swing.JTextField();
        jPanelGastoItems = new javax.swing.JPanel();
        jLabelArriendoOficina = new javax.swing.JLabel();
        jLabelGastosOperacionales = new javax.swing.JLabel();
        jLabelGastosMaterialApoyo = new javax.swing.JLabel();
        jLabelInsumos = new javax.swing.JLabel();
        jLabelGastosBasicos = new javax.swing.JLabel();
        jLabelGastosMovilizacion = new javax.swing.JLabel();
        jLabelGastosCoffeBreaks = new javax.swing.JLabel();
        jLabelGastosAlimentacion = new javax.swing.JLabel();
        jLabelGastosServiciosExternos = new javax.swing.JLabel();
        jLabelTotalGastos = new javax.swing.JLabel();
        jLabelGastosPesos = new javax.swing.JLabel();
        jLabelGastosUF = new javax.swing.JLabel();
        jTextFieldArriendoOficinaPesos = new javax.swing.JTextField();
        jTextFieldArriendoOficinaUF = new javax.swing.JTextField();
        jTextFieldGastosOperacionalesUF = new javax.swing.JTextField();
        jTextFieldGastosOperacionalesPesos = new javax.swing.JTextField();
        jTextFieldGastosMaterialApoyoUF = new javax.swing.JTextField();
        jTextFieldGastosMaterialApoyoPesos = new javax.swing.JTextField();
        jTextFieldInsumosUF = new javax.swing.JTextField();
        jTextFieldInsumosPesos = new javax.swing.JTextField();
        jTextFieldGastosBasicosUF = new javax.swing.JTextField();
        jTextFieldGastosBasicosPesos = new javax.swing.JTextField();
        jTextFieldGastosMovilizacionUF = new javax.swing.JTextField();
        jTextFieldGastosMovilizacionPesos = new javax.swing.JTextField();
        jTextFieldGastosCoffeBreaksPesos = new javax.swing.JTextField();
        jTextFieldGastosCoffeBreaksUF = new javax.swing.JTextField();
        jTextFieldGastosAlimentacionPesos = new javax.swing.JTextField();
        jTextFieldGastosAlimentacionUF = new javax.swing.JTextField();
        jTextFieldGastosServiciosExternosPesos = new javax.swing.JTextField();
        jTextFieldGastosServiciosExternosUF = new javax.swing.JTextField();
        jTextFieldGastosTotalPesos = new javax.swing.JTextField();
        jTextFieldGastosTotalUF = new javax.swing.JTextField();
        jPanelCostosReparacion = new javax.swing.JPanel();
        jPanelCantidad = new javax.swing.JPanel();
        jLabelHorasReparacion = new javax.swing.JLabel();
        jLabelNumeroDesarrolladores = new javax.swing.JLabel();
        jTextFieldHorasReparacion = new javax.swing.JTextField();
        jTextFieldValorNumeroDesarrolladores = new javax.swing.JTextField();
        jPanelDesarrollador = new javax.swing.JPanel();
        jLabelValorHHDesarrolladorPesos = new javax.swing.JLabel();
        jLabelValorHHDesarrolladorUF = new javax.swing.JLabel();
        jTextFieldValorHHDesarrolladorPesos = new javax.swing.JTextField();
        jTextFieldValorHHDesarrolladorUF = new javax.swing.JTextField();

        setMaximumSize(new java.awt.Dimension(595, 540));
        setMinimumSize(new java.awt.Dimension(595, 540));
        setPreferredSize(new java.awt.Dimension(595, 540));

        jPanelValorUF.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        jLabelIngresoValorUF.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabelIngresoValorUF.setText("Ingrese el valor de la UF:");

        jTextFieldValorUF.setPreferredSize(new java.awt.Dimension(100, 20));
        jTextFieldValorUF.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldValorUFKeyReleased(evt);
            }
        });

        javax.swing.GroupLayout jPanelValorUFLayout = new javax.swing.GroupLayout(jPanelValorUF);
        jPanelValorUF.setLayout(jPanelValorUFLayout);
        jPanelValorUFLayout.setHorizontalGroup(
            jPanelValorUFLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelValorUFLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabelIngresoValorUF)
                .addGap(18, 18, 18)
                .addComponent(jTextFieldValorUF, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(294, Short.MAX_VALUE))
        );
        jPanelValorUFLayout.setVerticalGroup(
            jPanelValorUFLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelValorUFLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelValorUFLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelIngresoValorUF)
                    .addComponent(jTextFieldValorUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanelCostosDiseñoEvaluacionAnalisis.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Costos Fase de Diseño, Evaluación y Análisis"));

        jLabelFactorCosto.setText("Factor Costo (%):");

        jTextFieldValorFactorCosto.setPreferredSize(new java.awt.Dimension(90, 20));

        javax.swing.GroupLayout jPanelFactorCostoLayout = new javax.swing.GroupLayout(jPanelFactorCosto);
        jPanelFactorCosto.setLayout(jPanelFactorCostoLayout);
        jPanelFactorCostoLayout.setHorizontalGroup(
            jPanelFactorCostoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFactorCostoLayout.createSequentialGroup()
                .addComponent(jLabelFactorCosto)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
                .addComponent(jTextFieldValorFactorCosto, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanelFactorCostoLayout.setVerticalGroup(
            jPanelFactorCostoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFactorCostoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelFactorCostoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelFactorCosto)
                    .addComponent(jTextFieldValorFactorCosto, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanelTotalCosto.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Total Costo"));

        jLabelTotalCostoPesos.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelTotalCostoPesos.setText("En Pesos ($)");
        jLabelTotalCostoPesos.setMaximumSize(new java.awt.Dimension(80, 14));
        jLabelTotalCostoPesos.setMinimumSize(new java.awt.Dimension(80, 14));
        jLabelTotalCostoPesos.setPreferredSize(new java.awt.Dimension(80, 14));

        jLabelTotalCostosUF.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelTotalCostosUF.setText("En UF");
        jLabelTotalCostosUF.setMaximumSize(new java.awt.Dimension(80, 14));
        jLabelTotalCostosUF.setMinimumSize(new java.awt.Dimension(80, 14));
        jLabelTotalCostosUF.setPreferredSize(new java.awt.Dimension(80, 14));

        jTextFieldTotalCostoPesos.setEnabled(false);
        jTextFieldTotalCostoPesos.setMaximumSize(new java.awt.Dimension(80, 14));
        jTextFieldTotalCostoPesos.setMinimumSize(new java.awt.Dimension(80, 14));
        jTextFieldTotalCostoPesos.setPreferredSize(new java.awt.Dimension(80, 20));

        jTextFieldTotalCostoUF.setEnabled(false);
        jTextFieldTotalCostoUF.setMaximumSize(new java.awt.Dimension(80, 14));
        jTextFieldTotalCostoUF.setMinimumSize(new java.awt.Dimension(80, 14));
        jTextFieldTotalCostoUF.setPreferredSize(new java.awt.Dimension(80, 20));

        javax.swing.GroupLayout jPanelTotalCostoLayout = new javax.swing.GroupLayout(jPanelTotalCosto);
        jPanelTotalCosto.setLayout(jPanelTotalCostoLayout);
        jPanelTotalCostoLayout.setHorizontalGroup(
            jPanelTotalCostoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelTotalCostoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelTotalCostoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelTotalCostoPesos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jTextFieldTotalCostoPesos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelTotalCostoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabelTotalCostosUF, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldTotalCostoUF, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        jPanelTotalCostoLayout.setVerticalGroup(
            jPanelTotalCostoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelTotalCostoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelTotalCostoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelTotalCostoPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelTotalCostosUF, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanelTotalCostoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldTotalCostoPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldTotalCostoUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanelGastoItems.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Gasto por ítem"));

        jLabelArriendoOficina.setText("Arriendo de Oficina:");
        jLabelArriendoOficina.setMaximumSize(new java.awt.Dimension(135, 14));
        jLabelArriendoOficina.setMinimumSize(new java.awt.Dimension(135, 14));
        jLabelArriendoOficina.setPreferredSize(new java.awt.Dimension(135, 14));

        jLabelGastosOperacionales.setText("Gastos Operacionales:");
        jLabelGastosOperacionales.setMaximumSize(new java.awt.Dimension(135, 14));
        jLabelGastosOperacionales.setMinimumSize(new java.awt.Dimension(135, 14));
        jLabelGastosOperacionales.setPreferredSize(new java.awt.Dimension(135, 14));

        jLabelGastosMaterialApoyo.setText("Gastos Material de Apoyo:");
        jLabelGastosMaterialApoyo.setMaximumSize(new java.awt.Dimension(135, 14));
        jLabelGastosMaterialApoyo.setMinimumSize(new java.awt.Dimension(135, 14));
        jLabelGastosMaterialApoyo.setPreferredSize(new java.awt.Dimension(135, 14));

        jLabelInsumos.setText("Insumos");
        jLabelInsumos.setMaximumSize(new java.awt.Dimension(135, 14));
        jLabelInsumos.setMinimumSize(new java.awt.Dimension(135, 14));
        jLabelInsumos.setPreferredSize(new java.awt.Dimension(135, 14));

        jLabelGastosBasicos.setText("Gastos Básicos");
        jLabelGastosBasicos.setMaximumSize(new java.awt.Dimension(135, 14));
        jLabelGastosBasicos.setMinimumSize(new java.awt.Dimension(135, 14));
        jLabelGastosBasicos.setPreferredSize(new java.awt.Dimension(135, 14));

        jLabelGastosMovilizacion.setText("Gastos por Movilización:");
        jLabelGastosMovilizacion.setMaximumSize(new java.awt.Dimension(135, 14));
        jLabelGastosMovilizacion.setMinimumSize(new java.awt.Dimension(135, 14));
        jLabelGastosMovilizacion.setPreferredSize(new java.awt.Dimension(135, 14));

        jLabelGastosCoffeBreaks.setText("Gastos por Coffe Breaks:");
        jLabelGastosCoffeBreaks.setMaximumSize(new java.awt.Dimension(135, 14));
        jLabelGastosCoffeBreaks.setMinimumSize(new java.awt.Dimension(135, 14));
        jLabelGastosCoffeBreaks.setPreferredSize(new java.awt.Dimension(135, 14));

        jLabelGastosAlimentacion.setText("Gastos por Alimentación:");
        jLabelGastosAlimentacion.setMaximumSize(new java.awt.Dimension(135, 14));
        jLabelGastosAlimentacion.setMinimumSize(new java.awt.Dimension(135, 14));
        jLabelGastosAlimentacion.setPreferredSize(new java.awt.Dimension(135, 14));

        jLabelGastosServiciosExternos.setText("Gastos Servicios Externos:");
        jLabelGastosServiciosExternos.setMaximumSize(new java.awt.Dimension(135, 14));
        jLabelGastosServiciosExternos.setMinimumSize(new java.awt.Dimension(135, 14));
        jLabelGastosServiciosExternos.setPreferredSize(new java.awt.Dimension(135, 14));

        jLabelTotalGastos.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabelTotalGastos.setText("TOTAL:");
        jLabelTotalGastos.setMaximumSize(new java.awt.Dimension(135, 14));
        jLabelTotalGastos.setMinimumSize(new java.awt.Dimension(135, 14));
        jLabelTotalGastos.setPreferredSize(new java.awt.Dimension(135, 14));

        jLabelGastosPesos.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelGastosPesos.setText("En Pesos ($)");

        jLabelGastosUF.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelGastosUF.setText("En UF");

        jTextFieldArriendoOficinaPesos.setPreferredSize(new java.awt.Dimension(80, 20));
        jTextFieldArriendoOficinaPesos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldArriendoOficinaPesosKeyReleased(evt);
            }
        });

        jTextFieldArriendoOficinaUF.setEnabled(false);
        jTextFieldArriendoOficinaUF.setPreferredSize(new java.awt.Dimension(80, 20));

        jTextFieldGastosOperacionalesUF.setEnabled(false);
        jTextFieldGastosOperacionalesUF.setPreferredSize(new java.awt.Dimension(80, 20));

        jTextFieldGastosOperacionalesPesos.setPreferredSize(new java.awt.Dimension(80, 20));
        jTextFieldGastosOperacionalesPesos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldGastosOperacionalesPesosKeyReleased(evt);
            }
        });

        jTextFieldGastosMaterialApoyoUF.setEnabled(false);
        jTextFieldGastosMaterialApoyoUF.setPreferredSize(new java.awt.Dimension(80, 20));

        jTextFieldGastosMaterialApoyoPesos.setPreferredSize(new java.awt.Dimension(80, 20));
        jTextFieldGastosMaterialApoyoPesos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldGastosMaterialApoyoPesosKeyReleased(evt);
            }
        });

        jTextFieldInsumosUF.setEnabled(false);
        jTextFieldInsumosUF.setPreferredSize(new java.awt.Dimension(80, 20));

        jTextFieldInsumosPesos.setPreferredSize(new java.awt.Dimension(80, 20));
        jTextFieldInsumosPesos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldInsumosPesosKeyReleased(evt);
            }
        });

        jTextFieldGastosBasicosUF.setEnabled(false);
        jTextFieldGastosBasicosUF.setPreferredSize(new java.awt.Dimension(80, 20));

        jTextFieldGastosBasicosPesos.setPreferredSize(new java.awt.Dimension(80, 20));
        jTextFieldGastosBasicosPesos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldGastosBasicosPesosKeyReleased(evt);
            }
        });

        jTextFieldGastosMovilizacionUF.setEnabled(false);
        jTextFieldGastosMovilizacionUF.setPreferredSize(new java.awt.Dimension(80, 20));

        jTextFieldGastosMovilizacionPesos.setPreferredSize(new java.awt.Dimension(80, 20));
        jTextFieldGastosMovilizacionPesos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldGastosMovilizacionPesosKeyReleased(evt);
            }
        });

        jTextFieldGastosCoffeBreaksPesos.setPreferredSize(new java.awt.Dimension(80, 20));
        jTextFieldGastosCoffeBreaksPesos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldGastosCoffeBreaksPesosKeyReleased(evt);
            }
        });

        jTextFieldGastosCoffeBreaksUF.setEnabled(false);
        jTextFieldGastosCoffeBreaksUF.setPreferredSize(new java.awt.Dimension(80, 20));

        jTextFieldGastosAlimentacionPesos.setPreferredSize(new java.awt.Dimension(80, 20));
        jTextFieldGastosAlimentacionPesos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldGastosAlimentacionPesosKeyReleased(evt);
            }
        });

        jTextFieldGastosAlimentacionUF.setEnabled(false);
        jTextFieldGastosAlimentacionUF.setPreferredSize(new java.awt.Dimension(80, 20));

        jTextFieldGastosServiciosExternosPesos.setPreferredSize(new java.awt.Dimension(80, 20));
        jTextFieldGastosServiciosExternosPesos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldGastosServiciosExternosPesosKeyReleased(evt);
            }
        });

        jTextFieldGastosServiciosExternosUF.setEnabled(false);
        jTextFieldGastosServiciosExternosUF.setPreferredSize(new java.awt.Dimension(80, 20));

        jTextFieldGastosTotalPesos.setEnabled(false);
        jTextFieldGastosTotalPesos.setPreferredSize(new java.awt.Dimension(80, 20));

        jTextFieldGastosTotalUF.setEnabled(false);
        jTextFieldGastosTotalUF.setPreferredSize(new java.awt.Dimension(80, 20));

        javax.swing.GroupLayout jPanelGastoItemsLayout = new javax.swing.GroupLayout(jPanelGastoItems);
        jPanelGastoItems.setLayout(jPanelGastoItemsLayout);
        jPanelGastoItemsLayout.setHorizontalGroup(
            jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                        .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(jLabelGastosBasicos, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)
                                .addComponent(jLabelInsumos, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)
                                .addComponent(jLabelGastosMaterialApoyo, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)
                                .addComponent(jLabelGastosOperacionales, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE)
                                .addComponent(jLabelArriendoOficina, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jLabelGastosMovilizacion, javax.swing.GroupLayout.DEFAULT_SIZE, 135, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jLabelGastosPesos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jTextFieldArriendoOficinaPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jLabelGastosUF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jTextFieldArriendoOficinaUF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                            .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                                .addComponent(jTextFieldGastosOperacionalesPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldGastosOperacionalesUF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                                .addComponent(jTextFieldGastosMaterialApoyoPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldGastosMaterialApoyoUF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                                .addComponent(jTextFieldInsumosPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldInsumosUF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                                .addComponent(jTextFieldGastosBasicosPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldGastosBasicosUF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                                .addComponent(jTextFieldGastosMovilizacionPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 80, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextFieldGastosMovilizacionUF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                    .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                        .addComponent(jLabelGastosCoffeBreaks, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldGastosCoffeBreaksPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldGastosCoffeBreaksUF, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE))
                    .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                        .addComponent(jLabelGastosAlimentacion, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldGastosAlimentacionPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldGastosAlimentacionUF, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE))
                    .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                        .addComponent(jLabelGastosServiciosExternos, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldGastosServiciosExternosPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldGastosServiciosExternosUF, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE))
                    .addGroup(jPanelGastoItemsLayout.createSequentialGroup()
                        .addComponent(jLabelTotalGastos, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldGastosTotalPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTextFieldGastosTotalUF, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanelGastoItemsLayout.setVerticalGroup(
            jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelGastoItemsLayout.createSequentialGroup()
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelGastosPesos)
                    .addComponent(jLabelGastosUF))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 7, Short.MAX_VALUE)
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelArriendoOficina, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldArriendoOficinaPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldArriendoOficinaUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelGastosOperacionales, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosOperacionalesPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosOperacionalesUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelGastosMaterialApoyo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosMaterialApoyoPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosMaterialApoyoUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelInsumos, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldInsumosPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldInsumosUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelGastosBasicos, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosBasicosPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosBasicosUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldGastosMovilizacionPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosMovilizacionUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelGastosMovilizacion, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelGastosCoffeBreaks, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosCoffeBreaksPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosCoffeBreaksUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelGastosAlimentacion, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosAlimentacionPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosAlimentacionUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelGastosServiciosExternos, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosServiciosExternosPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosServiciosExternosUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelGastoItemsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelTotalGastos, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosTotalPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldGastosTotalUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanelCostosDiseñoEvaluacionAnalisisLayout = new javax.swing.GroupLayout(jPanelCostosDiseñoEvaluacionAnalisis);
        jPanelCostosDiseñoEvaluacionAnalisis.setLayout(jPanelCostosDiseñoEvaluacionAnalisisLayout);
        jPanelCostosDiseñoEvaluacionAnalisisLayout.setHorizontalGroup(
            jPanelCostosDiseñoEvaluacionAnalisisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelCostosDiseñoEvaluacionAnalisisLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanelGastoItems, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelCostosDiseñoEvaluacionAnalisisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanelTotalCosto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelFactorCosto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanelCostosDiseñoEvaluacionAnalisisLayout.setVerticalGroup(
            jPanelCostosDiseñoEvaluacionAnalisisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCostosDiseñoEvaluacionAnalisisLayout.createSequentialGroup()
                .addGroup(jPanelCostosDiseñoEvaluacionAnalisisLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelCostosDiseñoEvaluacionAnalisisLayout.createSequentialGroup()
                        .addComponent(jPanelFactorCosto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanelTotalCosto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanelGastoItems, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(16, Short.MAX_VALUE))
        );

        jPanelCostosReparacion.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Costos por Fase de Reparación"));

        jPanelCantidad.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Cantidad"));

        jLabelHorasReparacion.setText("Horas de Reparación:");

        jLabelNumeroDesarrolladores.setText("Número de desarrolladores:");

        jTextFieldHorasReparacion.setMaximumSize(new java.awt.Dimension(100, 20));
        jTextFieldHorasReparacion.setMinimumSize(new java.awt.Dimension(100, 20));
        jTextFieldHorasReparacion.setPreferredSize(new java.awt.Dimension(100, 20));

        jTextFieldValorNumeroDesarrolladores.setMaximumSize(new java.awt.Dimension(100, 20));
        jTextFieldValorNumeroDesarrolladores.setMinimumSize(new java.awt.Dimension(100, 20));
        jTextFieldValorNumeroDesarrolladores.setPreferredSize(new java.awt.Dimension(100, 20));

        javax.swing.GroupLayout jPanelCantidadLayout = new javax.swing.GroupLayout(jPanelCantidad);
        jPanelCantidad.setLayout(jPanelCantidadLayout);
        jPanelCantidadLayout.setHorizontalGroup(
            jPanelCantidadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCantidadLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelCantidadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelNumeroDesarrolladores, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelHorasReparacion, javax.swing.GroupLayout.PREFERRED_SIZE, 135, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanelCantidadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldValorNumeroDesarrolladores, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldHorasReparacion, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(20, Short.MAX_VALUE))
        );
        jPanelCantidadLayout.setVerticalGroup(
            jPanelCantidadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCantidadLayout.createSequentialGroup()
                .addGroup(jPanelCantidadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelHorasReparacion)
                    .addComponent(jTextFieldHorasReparacion, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanelCantidadLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelNumeroDesarrolladores)
                    .addComponent(jTextFieldValorNumeroDesarrolladores, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanelDesarrollador.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Valor HH Desarrollador"));

        jLabelValorHHDesarrolladorPesos.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelValorHHDesarrolladorPesos.setText("En Pesos ($)");

        jLabelValorHHDesarrolladorUF.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelValorHHDesarrolladorUF.setText("En UF");

        jTextFieldValorHHDesarrolladorPesos.setPreferredSize(new java.awt.Dimension(80, 20));
        jTextFieldValorHHDesarrolladorPesos.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldValorHHDesarrolladorPesosKeyReleased(evt);
            }
        });

        jTextFieldValorHHDesarrolladorUF.setEnabled(false);
        jTextFieldValorHHDesarrolladorUF.setPreferredSize(new java.awt.Dimension(80, 20));

        javax.swing.GroupLayout jPanelDesarrolladorLayout = new javax.swing.GroupLayout(jPanelDesarrollador);
        jPanelDesarrollador.setLayout(jPanelDesarrolladorLayout);
        jPanelDesarrolladorLayout.setHorizontalGroup(
            jPanelDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelDesarrolladorLayout.createSequentialGroup()
                .addGap(30, 30, 30)
                .addGroup(jPanelDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelValorHHDesarrolladorPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
                    .addComponent(jTextFieldValorHHDesarrolladorPesos, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelValorHHDesarrolladorUF, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE)
                    .addComponent(jTextFieldValorHHDesarrolladorUF, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 81, Short.MAX_VALUE))
                .addGap(32, 32, 32))
        );
        jPanelDesarrolladorLayout.setVerticalGroup(
            jPanelDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelDesarrolladorLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelValorHHDesarrolladorPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelValorHHDesarrolladorUF))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanelDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldValorHHDesarrolladorPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldValorHHDesarrolladorUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanelCostosReparacionLayout = new javax.swing.GroupLayout(jPanelCostosReparacion);
        jPanelCostosReparacion.setLayout(jPanelCostosReparacionLayout);
        jPanelCostosReparacionLayout.setHorizontalGroup(
            jPanelCostosReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCostosReparacionLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanelCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelDesarrollador, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanelCostosReparacionLayout.setVerticalGroup(
            jPanelCostosReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCostosReparacionLayout.createSequentialGroup()
                .addGroup(jPanelCostosReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanelDesarrollador, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelCantidad, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanelValorUF, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelCostosDiseñoEvaluacionAnalisis, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelCostosReparacion, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanelValorUF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelCostosDiseñoEvaluacionAnalisis, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelCostosReparacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jTextFieldGastosOperacionalesPesosKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldGastosOperacionalesPesosKeyReleased
            this.calculaUF(jTextFieldGastosOperacionalesPesos, jTextFieldGastosOperacionalesUF);
    }//GEN-LAST:event_jTextFieldGastosOperacionalesPesosKeyReleased

    private void jTextFieldGastosMaterialApoyoPesosKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldGastosMaterialApoyoPesosKeyReleased
            this.calculaUF(jTextFieldGastosMaterialApoyoPesos, jTextFieldGastosMaterialApoyoUF);
            
    }//GEN-LAST:event_jTextFieldGastosMaterialApoyoPesosKeyReleased

    private void jTextFieldInsumosPesosKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldInsumosPesosKeyReleased
            this.calculaUF(jTextFieldInsumosPesos, jTextFieldInsumosUF);
                 
    }//GEN-LAST:event_jTextFieldInsumosPesosKeyReleased

    private void jTextFieldGastosBasicosPesosKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldGastosBasicosPesosKeyReleased
             this.calculaUF(jTextFieldGastosBasicosPesos, jTextFieldGastosBasicosUF);
            
    }//GEN-LAST:event_jTextFieldGastosBasicosPesosKeyReleased

    private void jTextFieldGastosMovilizacionPesosKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldGastosMovilizacionPesosKeyReleased
             this.calculaUF( jTextFieldGastosMovilizacionPesos, jTextFieldGastosMovilizacionUF);
               
    }//GEN-LAST:event_jTextFieldGastosMovilizacionPesosKeyReleased

    private void jTextFieldGastosCoffeBreaksPesosKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldGastosCoffeBreaksPesosKeyReleased
              this.calculaUF(jTextFieldGastosCoffeBreaksPesos, jTextFieldGastosCoffeBreaksUF);
                
    }//GEN-LAST:event_jTextFieldGastosCoffeBreaksPesosKeyReleased

    private void jTextFieldGastosAlimentacionPesosKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldGastosAlimentacionPesosKeyReleased
            this.calculaUF(jTextFieldGastosAlimentacionPesos, jTextFieldGastosAlimentacionUF);
           
    }//GEN-LAST:event_jTextFieldGastosAlimentacionPesosKeyReleased

    private void jTextFieldGastosServiciosExternosPesosKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldGastosServiciosExternosPesosKeyReleased
            this.calculaUF(jTextFieldGastosServiciosExternosPesos, jTextFieldGastosServiciosExternosUF);    // TODO add your handling code here:
    }//GEN-LAST:event_jTextFieldGastosServiciosExternosPesosKeyReleased

    private void jTextFieldArriendoOficinaPesosKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldArriendoOficinaPesosKeyReleased
             this.calculaUF(jTextFieldArriendoOficinaPesos, jTextFieldArriendoOficinaUF);     // TODO add your handling code here:
    }//GEN-LAST:event_jTextFieldArriendoOficinaPesosKeyReleased

    private void jTextFieldValorUFKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldValorUFKeyReleased
            this.setUF(jTextFieldValorUF);//Se instancia el valor de la UF
            /* al existir un cambio, se calculan los gastos en UF*/
            this.calculaUF(jTextFieldArriendoOficinaPesos, jTextFieldArriendoOficinaUF);
            this.calculaUF( jTextFieldGastosOperacionalesPesos,  jTextFieldGastosOperacionalesUF);
            this.calculaUF(jTextFieldGastosMaterialApoyoPesos, jTextFieldGastosMaterialApoyoUF);
            this.calculaUF(jTextFieldInsumosPesos, jTextFieldInsumosUF);
            this.calculaUF(jTextFieldGastosBasicosPesos, jTextFieldGastosBasicosUF);
            this.calculaUF( jTextFieldGastosMovilizacionPesos, jTextFieldGastosMovilizacionUF);
            this.calculaUF(jTextFieldGastosCoffeBreaksPesos, jTextFieldGastosCoffeBreaksUF);
            this.calculaUF(jTextFieldGastosAlimentacionPesos, jTextFieldGastosAlimentacionUF);
            this.calculaUF(jTextFieldGastosServiciosExternosPesos, jTextFieldGastosServiciosExternosUF);
            this.calculaUF(jTextFieldValorHHDesarrolladorPesos, jTextFieldValorHHDesarrolladorUF);
    }//GEN-LAST:event_jTextFieldValorUFKeyReleased

    private void jTextFieldValorHHDesarrolladorPesosKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldValorHHDesarrolladorPesosKeyReleased
             this.calculaUF(jTextFieldValorHHDesarrolladorPesos, jTextFieldValorHHDesarrolladorUF);        // TODO add your handling code here:
    }//GEN-LAST:event_jTextFieldValorHHDesarrolladorPesosKeyReleased


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabelArriendoOficina;
    private javax.swing.JLabel jLabelFactorCosto;
    private javax.swing.JLabel jLabelGastosAlimentacion;
    private javax.swing.JLabel jLabelGastosBasicos;
    private javax.swing.JLabel jLabelGastosCoffeBreaks;
    private javax.swing.JLabel jLabelGastosMaterialApoyo;
    private javax.swing.JLabel jLabelGastosMovilizacion;
    private javax.swing.JLabel jLabelGastosOperacionales;
    private javax.swing.JLabel jLabelGastosPesos;
    private javax.swing.JLabel jLabelGastosServiciosExternos;
    private javax.swing.JLabel jLabelGastosUF;
    private javax.swing.JLabel jLabelHorasReparacion;
    private javax.swing.JLabel jLabelIngresoValorUF;
    private javax.swing.JLabel jLabelInsumos;
    private javax.swing.JLabel jLabelNumeroDesarrolladores;
    private javax.swing.JLabel jLabelTotalCostoPesos;
    private javax.swing.JLabel jLabelTotalCostosUF;
    private javax.swing.JLabel jLabelTotalGastos;
    private javax.swing.JLabel jLabelValorHHDesarrolladorPesos;
    private javax.swing.JLabel jLabelValorHHDesarrolladorUF;
    private javax.swing.JPanel jPanelCantidad;
    private javax.swing.JPanel jPanelCostosDiseñoEvaluacionAnalisis;
    private javax.swing.JPanel jPanelCostosReparacion;
    private javax.swing.JPanel jPanelDesarrollador;
    private javax.swing.JPanel jPanelFactorCosto;
    private javax.swing.JPanel jPanelGastoItems;
    private javax.swing.JPanel jPanelTotalCosto;
    private javax.swing.JPanel jPanelValorUF;
    private javax.swing.JTextField jTextFieldArriendoOficinaPesos;
    private javax.swing.JTextField jTextFieldArriendoOficinaUF;
    private javax.swing.JTextField jTextFieldGastosAlimentacionPesos;
    private javax.swing.JTextField jTextFieldGastosAlimentacionUF;
    private javax.swing.JTextField jTextFieldGastosBasicosPesos;
    private javax.swing.JTextField jTextFieldGastosBasicosUF;
    private javax.swing.JTextField jTextFieldGastosCoffeBreaksPesos;
    private javax.swing.JTextField jTextFieldGastosCoffeBreaksUF;
    private javax.swing.JTextField jTextFieldGastosMaterialApoyoPesos;
    private javax.swing.JTextField jTextFieldGastosMaterialApoyoUF;
    private javax.swing.JTextField jTextFieldGastosMovilizacionPesos;
    private javax.swing.JTextField jTextFieldGastosMovilizacionUF;
    private javax.swing.JTextField jTextFieldGastosOperacionalesPesos;
    private javax.swing.JTextField jTextFieldGastosOperacionalesUF;
    private javax.swing.JTextField jTextFieldGastosServiciosExternosPesos;
    private javax.swing.JTextField jTextFieldGastosServiciosExternosUF;
    private javax.swing.JTextField jTextFieldGastosTotalPesos;
    private javax.swing.JTextField jTextFieldGastosTotalUF;
    private javax.swing.JTextField jTextFieldHorasReparacion;
    private javax.swing.JTextField jTextFieldInsumosPesos;
    private javax.swing.JTextField jTextFieldInsumosUF;
    private javax.swing.JTextField jTextFieldTotalCostoPesos;
    private javax.swing.JTextField jTextFieldTotalCostoUF;
    private javax.swing.JTextField jTextFieldValorFactorCosto;
    private javax.swing.JTextField jTextFieldValorHHDesarrolladorPesos;
    private javax.swing.JTextField jTextFieldValorHHDesarrolladorUF;
    private javax.swing.JTextField jTextFieldValorNumeroDesarrolladores;
    private javax.swing.JTextField jTextFieldValorUF;
    // End of variables declaration//GEN-END:variables

}
